package com.kcht.sylyg08.ctrl;

import com.kcht.adp.common.log.Logger;
import com.kcht.adp.pagination.Page;
import com.kcht.adp.web.rs.AdpRest;
import com.kcht.sylyg08.service.InterveneRecordService;
import com.kcth.sylyg08.entity.InterveneRecord;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.ws.rs.QueryParam;
import java.util.List;

@RequestScoped
@Transactional(Transactional.TxType.NOT_SUPPORTED)
public class InterveneRecordCtrl {
    @Inject
    private Logger logger;
    @Inject
    private InterveneRecordService service;

    @AdpRest(principal = "人为干涉记录", permission = "人为干涉记录")
    public Page<InterveneRecord, InterveneRecord> list(Page<InterveneRecord, InterveneRecord> page) {
        return service.list(page);
    }
    @AdpRest(principal = "人为干涉记录", permission = "人为干涉记录")
    public void save(InterveneRecord record) {
        service.save(record);
    }
    @AdpRest(principal = "人为干涉记录", permission = "人为干涉记录")
    public void delete(@QueryParam("ids") List<Integer> ids){
        service.delete(ids);
    }
}
